package com.obrock;

import android.view.View;
import android.widget.ScrollView;

/**
 * Created with IntelliJ IDEA.
 * User: Дмитрий Г. Кузнецов
 * Date: 05.10.12
 * Time: 16:13
 * To change this template use File | Settings | File Templates.
 */
public class ScrollTo implements Runnable {

    ScrollView scroller;
    View child;

    ScrollTo(ScrollView scroller, View child) {
        this.scroller = scroller;
        this.child = child;

    }

    public void run() {
        if (child != null) {
            scroller.scrollTo(0, child.getTop());
        }
    }
}